package com.flying.arts.trade.domain.entity;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.flying.arts.common.domain.entity.BaseEntity;
import com.flying.arts.trade.domain.definition.Side;

import java.util.Date;

public class Trade extends BaseEntity<Long> {
    private String stockName;
    private Side side;
    private double price;
    private long quantity;
    private double amount;
    private int date;

    @JsonCreator
    public Trade(@JsonProperty("id") long id) {
        super(id);
    }

    public Trade(Long id, String stockName, Side side, double price, long quantity, double amount, int date) {
        super(id);
        this.stockName = stockName;
        this.side = side;
        this.price = price;
        this.quantity = quantity;
        this.amount = amount;
        this.date = date;
    }

    public String getStockName() {
        return stockName;
    }

    public void setStockName(String stockName) {
        this.stockName = stockName;
    }

    public Side getSide() {
        return side;
    }

    public void setSide(Side side) {
        this.side = side;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public long getQuantity() {
        return quantity;
    }

    public void setQuantity(long quantity) {
        this.quantity = quantity;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public int getDate() {
        return date;
    }

    public void setDate(int date) {
        this.date = date;
    }
}